/**
 * 日志中间件
 *
 * 主要功能：
 * - 记录请求日志
 *
 * @file logger.js
 * @version 1.0.0
 * @author "nailuo"
 * @created 2025-9-1
 * @lastModified 2025-9-1
 */

let count = 0;
const logger = (req, res, next) => {
    console.log(`🗒️ 日志：总请求次数 ${++count}`);
    console.log(`🗒️ 日志：[${new Date().toLocaleString()}] - ${req.method} - ${req.protocol}://${req.get('host')}${req.originalUrl}`);
    next();
};
module.exports = logger;